//
//  Person.m
//  08-类的扩展
//
//  Created by 曹曹 on 16/7/13.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "Person.h"

@interface Person ()
@property (nonatomic, copy) NSString *salary;
- (void)getSalary;
@end

@implementation Person
- (void)setGender:(NSString *)gender {
    if (gender == nil) {
        gender = [NSString string];
    }
    _gender = gender;
}
- (void)hardworking {
    NSLog(@"努力工作");
    [self getSalary];
}
- (void)getSalary {
    NSLog(@"一分耕耘一分收获");
}
- (void)whenparentsLeave {
    NSLog(@"父母离开, 请保姆照顾小孩");
    if (self.delegate != nil && [self.delegate respondsToSelector:@selector(takeCareOfTheBaby:)]) {
        [self.delegate takeCareOfTheBaby:@"1000"];
    }
}
@end
